PLAT-1428 Removed unused cache_relation function - #16752
Merged
Merged
Conversation
bmedx
approved these changes
Dec 4, 2017
Contributor
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Tuesday, December 05, 2017. |
Contributor
|
EdX Release Notice: This PR has been deployed to the production environment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fun story on this one. I looked to see if the new ForeignObjectRel class had all of the fields we were using from the old
RelatedObjectone, butparent_modelhas been renamed torelated_model. But then I noticed that Django has been returning the new object as therelatedattribute since 1.8. The reason this didn't break anything for us is because...we don't use this module at all.It was copied into edx-platform along with the rest of the django-cache-toolbox package (which was added primarily for its cached authentication middleware, which we still use). An attempt was made to use
cache_relationon profile objects, but this was disabled within 2 weeks becase "we ran into issues"Nevertheless, the
relation.pymodule lived on. In the 5 years and 9 months since then, thecache_toolboxdirectory moved from the root ofedx-platformtolib, thenlms/lib, thencommon/lib, thencommon/djangoapps, thenopenedx/core/djangoapps. It was also cleansed of PEP 8 violations and had its imports reordered to satisfyisort.Although the original
django-cache-toolboxrepo has been unmaintained for years, there is a somewhat active fork still making releases to PyPI which has actually adapted to the field rename. But I think we can just let go of this module until we actually have a need for it again.